<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>OpenLayers v8.2.0 API - Class: Style</title>
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
        crossorigin="anonymous"></script>
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/fontawesome.min.css"
        crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/solid.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/brands.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="styles/prettify-tomorrow.css">
    <link rel="stylesheet" type="text/css" href="styles/jaguar.css">
    <link rel="stylesheet" type="text/css" href="styles/carbon.css">
    <link rel="stylesheet" type="text/css" href="/theme/ol.css">
    <link rel="stylesheet" type="text/css" href="/theme/site.css">
</head>

<body>
    <header class="navbar navbar-expand-sm navbar-dark mb-3 px-3 py-0 fixed-top" role="navigation">
        <a class="navbar-brand" href="/"><img src="/theme/img/logo-dark.svg" width="70" height="70"
                alt="">&nbsp;OpenLayers</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#olmenu"
            aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <!-- menu items that get hidden below 768px width -->
        <nav class="collapse navbar-collapse" id="olmenu">
            <ul class="nav navbar-nav ms-auto">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button"
                        data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
                    <div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="docdropdown">
                        <a class="dropdown-item" href="/doc/">Docs</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/doc/quickstart.html"><i
                                class="fa fa-check fa-fw me-2 fa-lg"></i>快速入门</a>
                        <a class="dropdown-item" href="/doc/faq.html"><i
                                class="fa fa-question fa-fw me-2 fa-lg"></i>FAQ</a>
                        <a class="dropdown-item" href="/doc/tutorials/"><i
                                class="fa fa-book fa-fw me-2 fa-lg"></i>Tutorials</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i
                                class="fab fa-stack-overflow fa-fw me-2"></i>Ask a Question</a>
                    </div>
                </li>
                <li class="nav-item"><a class="nav-link" href="/en/latest/examples/">Examples</a></li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="apidropdown" role="button"
                        data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-sitemap me-1"></i>API
                    </a>
                    <div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="apidropdown">
                        <a class="dropdown-item" href="/en/latest/apidoc/"><i
                                class="fa fa-sitemap fa-fw me-2 fa-lg"></i>v8.2.0
                            (latest)</a </div>
                </li>
            </ul>
        </nav>
    </header>

    <div class="container-fluid">
        <div id="wrap" class="row">
            <div class="navigation col-md-4 col-lg-3">
                <div class="search-wrapper">
                    <div class="search">
                        <input id="search" type="text" autocomplete="off" class="form-control input-sm"
                            placeholder="Search Documentation">
                    </div>
                </div>
                <div class="navigation-list-wrapper">
                    <ul class="navigation-list search-empty">
                        <li class="item item-class toggle-manual toggle-manual-show"
                            data-longname="module:ol/style/Style~Style" data-name="ol/style/style">
                            <span class="title toggle">
                                <span class="fa fa-chevron-right me-2 mt-1"></span>
                                <span><a href="module-ol_style_Style-Style.html">ol​/style​/Style</a></span>
                            </span>
                            <div class="member-list" data-type="methods">
                                <span class="subtitle">Methods</span>
                                <ul>
                                    <li data-name="clone"><a href="module-ol_style_Style-Style.html#clone">clone</a>
                                    <li data-name="getfill"><a
                                            href="module-ol_style_Style-Style.html#getFill">getFill</a>
                                    <li data-name="getgeometry"><a
                                            href="module-ol_style_Style-Style.html#getGeometry">getGeometry</a>
                                    <li data-name="getgeometryfunction"><a
                                            href="module-ol_style_Style-Style.html#getGeometryFunction">getGeometryFunction</a>
                                    <li data-name="gethitdetectionrenderer"><a
                                            href="module-ol_style_Style-Style.html#getHitDetectionRenderer">getHitDetectionRenderer</a>
                                    <li data-name="getimage"><a
                                            href="module-ol_style_Style-Style.html#getImage">getImage</a>
                                    <li data-name="getrenderer"><a
                                            href="module-ol_style_Style-Style.html#getRenderer">getRenderer</a>
                                    <li data-name="getstroke"><a
                                            href="module-ol_style_Style-Style.html#getStroke">getStroke</a>
                                    <li data-name="gettext"><a
                                            href="module-ol_style_Style-Style.html#getText">getText</a>
                                    <li data-name="getzindex"><a
                                            href="module-ol_style_Style-Style.html#getZIndex">getZIndex</a>
                                    <li data-name="setfill"><a
                                            href="module-ol_style_Style-Style.html#setFill">setFill</a>
                                    <li data-name="setgeometry"><a
                                            href="module-ol_style_Style-Style.html#setGeometry">setGeometry</a>
                                    <li data-name="sethitdetectionrenderer"><a
                                            href="module-ol_style_Style-Style.html#setHitDetectionRenderer">setHitDetectionRenderer</a>
                                    <li data-name="setimage"><a
                                            href="module-ol_style_Style-Style.html#setImage">setImage</a>
                                    <li data-name="setrenderer"><a
                                            href="module-ol_style_Style-Style.html#setRenderer">setRenderer</a>
                                    <li data-name="setstroke"><a
                                            href="module-ol_style_Style-Style.html#setStroke">setStroke</a>
                                    <li data-name="settext"><a
                                            href="module-ol_style_Style-Style.html#setText">setText</a>
                                    <li data-name="setzindex"><a
                                            href="module-ol_style_Style-Style.html#setZIndex">setZIndex</a>
                                </ul>
                            </div>
                        <li class="loading">Loading …
                    </ul>
                </div>
            </div>

            <div class="main col-md-8 col-lg-9">
                <h1 class="page-title" data-filename="module-ol_style_Style-Style.html">Class: Style</h1>
                <div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
                    <button id="latest-dismiss" type="button" class="btn-close" data-bs-dismiss="alert"
                        aria-label="Close"></button>
                    This documentation is for OpenLayers v<span id="package-version">8.2.0</span>. The <a
                        id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
                </div>




                <section class="content">

                    <header>
                        <h2 class="my-3">
                            <span class="ancestors"><a href="module-ol_style_Style.html">ol/style/Style</a>~</span>Style
                        </h2>
                        <br>



                        <pre
                            class="prettyprint source"><code>import Style from '<a href="module-ol_style_Style.html">ol/style/Style</a>.js';</code></pre>


                        <div class="row p-3 ">
                            <!-- <div id="ad" class="col-lg-5 order-2 align-self-center border rounded bg-light ">
                                <script async type="text/javascript"
                                    src="https://cdn.carbonads.com/carbon.js?serve=CE7DV53U&placement=openlayersorg"
                                    id="_carbonads_js"></script>
                            </div> -->

                            <div class="class-description col-lg-7 align-self-center ps-0">
                                <p>矢量要素渲染样式的容器。通过<code>set*()</code> 方法对样式或其子项所做的任何更改，在重新渲染使用该样式的要素或图层之前，将不会生效。</p>
                                <h2>Feature styles</h2>
                                <p>如果未定义样式，则使用以下默认样式：</p>
                                <pre class="prettyprint source lang-js"><code> import {Circle, Fill, Stroke, Style} from 'ol/style.js';

 const fill = new Fill({
   color: 'rgba(255,255,255,0.4)',
 });
 const stroke = new Stroke({
   color: '#3399CC',
   width: 1.25,
 });
 const styles = [
   new Style({
     image: new Circle({
       fill: fill,
       stroke: stroke,
       radius: 5,
     }),
     fill: fill,
     stroke: stroke,
   }),
 ];</code></pre>
                                <p>单独的编辑样式具有以下默认值：</p>
                                <pre class="prettyprint source lang-js"><code> import {Circle, Fill, Stroke, Style} from 'ol/style.js';

 const styles = {};
 const white = [255, 255, 255, 1];
 const blue = [0, 153, 255, 1];
 const width = 3;
 styles['Polygon'] = [
   new Style({
     fill: new Fill({
       color: [255, 255, 255, 0.5],
     }),
   }),
 ];
 styles['MultiPolygon'] =
     styles['Polygon'];
 styles['LineString'] = [
   new Style({
     stroke: new Stroke({
       color: white,
       width: width + 2,
     }),
   }),
   new Style({
     stroke: new Stroke({
       color: blue,
       width: width,
     }),
   }),
 ];
 styles['MultiLineString'] = styles['LineString'];

 styles['Circle'] = styles['Polygon'].concat(
   styles['LineString']
 );

 styles['Point'] = [
   new Style({
     image: new Circle({
       radius: width * 2,
       fill: new Fill({
         color: blue,
       }),
       stroke: new Stroke({
         color: white,
         width: width / 2,
       }),
     }),
     zIndex: Infinity,
   }),
 ];
 styles['MultiPoint'] =
     styles['Point'];
 styles['GeometryCollection'] =
     styles['Polygon'].concat(
         styles['LineString'],
         styles['Point']
     );</code></pre>
                            </div>

                        </div>
                    </header>

                    <article>
                        <div class="container-overview">



                            <dl>

                                <dt class="">

                                    <div class="nameContainer">
                                        <div class="anchor" id="Style">
                                        </div>
                                        <h4 class="name">
                                            new Style<span class="signature">(<span
                                                    class="optional">options</span>)</span>



                                        </h4>

                                        <div class="tag-source">
                                            <a
                                                href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                            <a
                                                href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L152">line
                                                152</a>
                                        </div>

                                    </div>


                                </dt>
                                <dd class="">













                                    <table class="params">
                                        <thead>
                                            <tr>

                                                <th>Name</th>


                                                <th>Type</th>

                                                <th class="last">Description</th>
                                            </tr>
                                        </thead>

                                        <tbody>


                                            <tr class="">

                                                <td class="name"><code>geometry</code></td>



                                                <td class="type">


                                                    <span class="param-type">string</span>
                                                    |

                                                    <span class="param-type"><a
                                                            href="module-ol_geom_Geometry-Geometry.html">Geometry</a></span>
                                                    |

                                                    <span class="param-type"><a
                                                            href="module-ol_style_Style.html#~GeometryFunction">GeometryFunction</a></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>要素属性或几何体或函数，返回要为此样式渲染的几何体。</p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>fill</code></td>



                                                <td class="type">


                                                    <span class="param-type"><a
                                                            href="module-ol_style_Fill-Fill.html">Fill</a></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>填充样式。</p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>image</code></td>



                                                <td class="type">


                                                    <span class="param-type"><a
                                                            href="module-ol_style_Image-ImageStyle.html">ImageStyle</a></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>Image style.</p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>renderer</code></td>



                                                <td class="type">


                                                    <span class="param-type"><a
                                                            href="module-ol_style_Style.html#~RenderFunction">RenderFunction</a></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>自定义渲染器。配置后，将忽略<code>fill</code>,
                                                        <code>stroke</code> and <code>image</code>
                                                        ，并且提供的函数将与每个几何体的每个渲染帧一起调用。
                                                    </p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>hitDetectionRenderer</code></td>



                                                <td class="type">


                                                    <span class="param-type"><a
                                                            href="module-ol_style_Style.html#~RenderFunction">RenderFunction</a></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>用于命中检测的自定义渲染器。如果提供，将用于命中检测渲染。</p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>stroke</code></td>



                                                <td class="type">


                                                    <span class="param-type"><a
                                                            href="module-ol_style_Stroke-Stroke.html">Stroke</a></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>边样式。</p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>text</code></td>



                                                <td class="type">


                                                    <span class="param-type"><a
                                                            href="module-ol_style_Text-Text.html">Text</a></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>Text style.</p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>zIndex</code></td>



                                                <td class="type">


                                                    <span class="param-type">number</span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>Z index.</p>
                                                </td>
                                            </tr>


                                        </tbody>
                                    </table>




                                    <dl class="details">





















                                    </dl>













                                </dd>

                            </dl>

                        </div>


















                        <h3 class="subsection-title">Methods</h3>

                        <dl>


                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="clone">
                                    </div>
                                    <h4 class="name">
                                        clone<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_style_Style-Style.html">Style</a>}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L226">line
                                            226</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>克隆样式。</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                The cloned style.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="getFill">
                                    </div>
                                    <h4 class="name">
                                        getFill<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_style_Fill-Fill.html">Fill</a> | null}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L310">line
                                            310</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the fill style.</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Fill style.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="getGeometry">
                                    </div>
                                    <h4 class="name">
                                        getGeometry<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{string | <a
                                                href="module-ol_geom_Geometry-Geometry.html">Geometry</a> | <a
                                                href="module-ol_style_Style.html#~GeometryFunction">GeometryFunction</a>
                                            | null}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L291">line
                                            291</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>获取要渲染的几何图形。</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                要素属性或几何图形或函数，用于返回将使用此样式呈现的几何图形。
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="getGeometryFunction">
                                    </div>
                                    <h4 class="name">
                                        getGeometryFunction<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_style_Style.html#~GeometryFunction">GeometryFunction</a>}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L301">line
                                            301</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>获取用于生成用于渲染的几何体的函数。</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                使用要素调用并返回要渲染的几何图形而不是要素的几何图形的函数。
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="getHitDetectionRenderer">
                                    </div>
                                    <h4 class="name">
                                        getHitDetectionRenderer<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_style_Style.html#~RenderFunction">RenderFunction</a> |
                                            null}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L280">line
                                            280</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>获取配置了
                                        <code>#setHitDetectionRenderer</code> or
                                        <code>hitDetectionRenderer</code>constructor 选项的自定义渲染器函数。
                                    </p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                自定义渲染器函数。
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="getImage">
                                    </div>
                                    <h4 class="name">
                                        getImage<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_style_Image-ImageStyle.html">ImageStyle</a> |
                                            null}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L328">line
                                            328</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>获取图像样式。</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Image style.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="getRenderer">
                                    </div>
                                    <h4 class="name">
                                        getRenderer<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_style_Style.html#~RenderFunction">RenderFunction</a> |
                                            null}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L250">line
                                            250</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>获取配置了
                                        <code>#setRenderer</code> or <code>renderer</code> constructor 选项的自定义渲染器函数。
                                    </p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Custom renderer function.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="getStroke">
                                    </div>
                                    <h4 class="name">
                                        getStroke<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_style_Stroke-Stroke.html">Stroke</a> | null}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L346">line
                                            346</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>获取描边样式。

                                    </p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Stroke style.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="getText">
                                    </div>
                                    <h4 class="name">
                                        getText<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_style_Text-Text.html">Text</a> | null}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L364">line
                                            364</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>获取文字样式。
                                    </p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Text style.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="getZIndex">
                                    </div>
                                    <h4 class="name">
                                        getZIndex<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{number | undefined}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L382">line
                                            382</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>获取z-index。
                                    </p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                ZIndex.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="setFill">
                                    </div>
                                    <h4 class="name">
                                        setFill<span class="signature">(fill)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L319">line
                                            319</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>设置填充样式</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>fill</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_style_Fill-Fill.html">Fill</a></span>
                                                |

                                                <span class="param-type">null</span>




                                            </td>



                                            <td class="description last">

                                                <p>填充样式。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="setGeometry">
                                    </div>
                                    <h4 class="name">
                                        setGeometry<span class="signature">(geometry)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L394">line
                                            394</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>设置渲染的几何，而不是要素的几何。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>geometry</code></td>



                                            <td class="type">


                                                <span class="param-type">string</span>
                                                |

                                                <span class="param-type"><a
                                                        href="module-ol_geom_Geometry-Geometry.html">Geometry</a></span>
                                                |

                                                <span class="param-type"><a
                                                        href="module-ol_style_Style.html#~GeometryFunction">GeometryFunction</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>要素属性或几何体或函数，返回要为此样式渲染的几何体。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="setHitDetectionRenderer">
                                    </div>
                                    <h4 class="name">
                                        setHitDetectionRenderer<span class="signature">(renderer)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L270">line
                                            270</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>为命中检测中使用的此样式设置自定义呈现器函数。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>renderer</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_style_Style.html#~RenderFunction">RenderFunction</a></span>
                                                |

                                                <span class="param-type">null</span>




                                            </td>



                                            <td class="description last">

                                                <p>Custom renderer function.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="setImage">
                                    </div>
                                    <h4 class="name">
                                        setImage<span class="signature">(image)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L337">line
                                            337</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Set the image style.</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>image</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_style_Image-ImageStyle.html">ImageStyle</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Image style.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="setRenderer">
                                    </div>
                                    <h4 class="name">
                                        setRenderer<span class="signature">(renderer)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L260">line
                                            260</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>为此样式设置自定义渲染器函数。设置后， <code>fill</code>,
                                        <code>stroke</code>
                                        and <code>image</code> 选项将被忽略。
                                    </p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>renderer</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_style_Style.html#~RenderFunction">RenderFunction</a></span>
                                                |

                                                <span class="param-type">null</span>




                                            </td>



                                            <td class="description last">

                                                <p>Custom renderer function.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="setStroke">
                                    </div>
                                    <h4 class="name">
                                        setStroke<span class="signature">(stroke)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L355">line
                                            355</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>设置描边样式。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>stroke</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_style_Stroke-Stroke.html">Stroke</a></span>
                                                |

                                                <span class="param-type">null</span>




                                            </td>



                                            <td class="description last">

                                                <p>边样式。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="setText">
                                    </div>
                                    <h4 class="name">
                                        setText<span class="signature">(text)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L373">line
                                            373</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>设置文本样式。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>text</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_style_Text-Text.html">Text</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Text style.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="setZIndex">
                                    </div>
                                    <h4 class="name">
                                        setZIndex<span class="signature">(zIndex)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js">style/Style.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/style/Style.js#L419">line
                                            419</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p> 设置 z-index。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>zIndex</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>
                                                |

                                                <span class="param-type">undefined</span>




                                            </td>



                                            <td class="description last">

                                                <p>ZIndex.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>

                        </dl>





                    </article>

                </section>




            </div>
        </div>
    </div>
    <script>prettyPrint();</script>
    <script src="scripts/linenumber.js"></script>
    <script src="scripts/main.js"></script>
</body>

</html>